/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package homework.demo4;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;

/**
 *2010404114
 * @author Administrator
 */
public class ReadFileDemo {
    public static void main(String[] args) throws Exception{
        File file=new File("text.txt");
        FileReader f=new FileReader(file);
        BufferedReader b=new BufferedReader(f);
        String temp=null;
        while((temp=b.readLine())!=null){
            System.out.println(temp);
        }
        System.out.println("************文件结束************");
    }

}
